<?php

class AdminDao{
	public function insert(){
		echo '添加管理员数据<br/>';
	}
}

class RoleDao{
	public function insert(){
		echo '添加角色<br/>';
	}
}

class LogDao{
	public function insert(){
		echo '添加日志<br/>';
	}
}
//外观角色
class Facade{
	private $adminDao;
	private $roleDao;
	private $logDao;
	
	public function __construct(){
		$this->adminDao = new AdminDao();
		$this->roleDao = new RoleDao();
		$this->logDao = new LogDao();
	}
	
	public function insertAdmin(){
		$this->adminDao->insert();
		$this->roleDao->insert();
		$this->logDao->insert();
	}
}

$facade = new Facade();
$facade->insertAdmin();